package com.yuanchu.goods.client;

import com.yuanchu.goods.entity.YoshopUserEntity;
import com.yuanchu.goods.entity.YoshopUserGradeEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 用户服务
 * @date: 2024-01-24 11:43
 */
@FeignClient(value = "yuanchu-store", fallbackFactory = FeignStoreServiceClientFallbackFactory.class)
public interface FeignStoreClient {



    /**
     * 查询积分配置
     * @return
     */
    @GetMapping("/store/setting/point")
    String queryPointData();

    /**
     * 查询用户ids
     * @return
     */
    @GetMapping("/store/shop/user/count/ids")
    List<Integer> queryUserIds();

    /**
     * 查询用户信息
     * @param userId
     * @return
     */
    @GetMapping("/store/shop/user/{userId}")
    YoshopUserEntity queryUserByUserId(@PathVariable("userId") Integer userId);



    /**
     * 查询会员等级
     */
    @GetMapping("store/user/grade/{gradeId}")
    YoshopUserGradeEntity queryUserGrade(@PathVariable("gradeId") Integer gradeId);

}
